package com.example.warehouse.bus.service;

import com.example.warehouse.bus.pojo.entity.BusSales;
import com.example.warehouse.bus.pojo.param.BusSalesAddNewParam;
import com.example.warehouse.bus.pojo.param.BusSalesSelectParam;
import com.example.warehouse.bus.pojo.param.BusSalesUpdateParam;
import com.example.warehouse.bus.pojo.vo.BusSalesAndSalesbackSelectCNVO;
import com.example.warehouse.bus.pojo.vo.BusSalesAndSalesbackSelectGNVO;
import com.example.warehouse.common.pojo.vo.PageBean;
import com.example.warehouse.common.security.CurrentPrincipal;
import org.springframework.transaction.annotation.Transactional;


import java.util.List;

/**
 * 销售订单_业务层_接口
 */
@Transactional
public interface IBusSalesService {
    /**
     * 添加_销售订单
     *
     * @param busSalesAddNewParam
     * @param currentPrincipal
     */
    void addNewBusSales(BusSalesAddNewParam busSalesAddNewParam, CurrentPrincipal currentPrincipal);

    /**
     * 逻辑删除_销售订单
     *
     * @param id
     * @param currentPrincipal
     */
    void delete(Long id, CurrentPrincipal currentPrincipal);

    /**
     * 任意项修改_销售订单
     *
     * @param busSalesUpdateParam
     * @param currentPrincipal
     */
    void update(BusSalesUpdateParam busSalesUpdateParam, CurrentPrincipal currentPrincipal);

    /**
     * 审批_销售订单
     *
     * @param id
     * @param approval
     * @param currentPrincipal
     * @param goodsName
     * @param goodsNum
     */
    void approvalSales(Long id, Integer approval, CurrentPrincipal currentPrincipal, String goodsName, Integer goodsNum);

    /**
     * 分页模糊查询_销售订单
     *
     * @param busSalesSelectParam
     * @param page
     * @param pageSize
     * @return
     */
    PageBean page(BusSalesSelectParam busSalesSelectParam, Integer page, Integer pageSize);

    /**
     * 下拉选查询_客户名称
     *
     * @return
     */
    List<BusSalesAndSalesbackSelectCNVO> listCustomerName();

    /**
     * 下拉选查询_商品名称
     *
     * @return
     */
    List<BusSalesAndSalesbackSelectGNVO> listGoodsName();

    /**
     * 销售数据导出
     *
     * @return
     */
    List<BusSales> selectAll();
}
